<template>
  <div id="container">
    <h1 >{{registerType}} <span @click="tabSwitch()" style="font-size:20px;text-decoration: underline">{{tabType}}</span> </h1>
    <transition name="slide-fade">
      <router-view></router-view>
    </transition>

  </div>

</template>

<script>
export default {
  name: "register",
  data () {
    return {
      registerType:'企业入驻',
      tabType:'切换为学校'
    }
  },
  methods: {
    tabSwitch(){
      if(this.registerType=='企业入驻'){
        this.registerType='学校入驻'
        this.tabType='切换为企业'
        this.$router.push('/main/register/university')
      }else{
        this.registerType='企业入驻'
        this.tabType='切换为学校'
        this.$router.push('/main/register/company')
      }
    }
  }
};
</script>

<style scoped>
#container {
  font-size: 17px;
  margin: 20px auto;
  /*background-color: #fff;*/
  width: 80%;
  height: 640px;
  box-sizing: border-box;
  padding: 10px 80px;
  overflow:hidden;
}
span{
  cursor: pointer;
  text-decoration: blue;
}
.slide-fade-enter-active {
  transition: all .2s ease;
  transition-delay: .2s;
}

.slide-fade-leave-active {
  transition: all .2s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}

.slide-fade-enter, .slide-fade-leave-to
  /* .slide-fade-leave-active for below version 2.1.8 */
{
  transform: translateY(-20px);
  opacity: 0;
}
</style>
